package tr.edu.metu.is.mega.client.service;

import java.util.List;

import tr.edu.metu.is.mega.common.dto.ReviewerDTO;
import tr.edu.metu.is.mega.common.dto.SubmissionDTO;
import tr.edu.metu.is.mega.common.dto.SubmissionRevisionDTO;
import tr.edu.metu.is.mega.common.dto.SubmissionViewDTO;
import tr.edu.metu.is.mega.common.dto.UserRole;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Async interface of {@link GwtSubmissionViewService}.
 */
public interface GwtSubmissionViewServiceAsync {

    /**
     * @see GwtSubmissionViewService#getSubmissions(int, int)
     */
    void getSubmissions(UserRole role, int courseid, int teamid, AsyncCallback<List<SubmissionViewDTO>> callback);

    void uploadSubmission(SubmissionDTO view, AsyncCallback<Void> callback);

    void assignReviewer(ReviewerDTO reviewer, AsyncCallback<Void> callback);

    void getRevisions(int activityid, int teamid, AsyncCallback<List<SubmissionRevisionDTO>> callback);

    void downloadAll(UserRole role, int courseid, int teamid, AsyncCallback<String> callback);

    void querySubmissionsToReview(int reviewerTeam, AsyncCallback<List<SubmissionDTO>> callback);

}
